/*
 * Controller.java
 *
 * Created on 3 November, 2010, 5:14 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package icardex;

import java.awt.Dimension;
import java.util.HashMap;

/**
 * This class controls the view and the model.
 * @author Bageshwar
 */
public class Controller {
    
    /** Creates a new instance of Controller */
    public Controller() {
    }
    
    public static void main(String[] args) {
        
        Model m  = new Model();
        m.setInputHTMLFile("G:/projects/svn/ICardex/src/sample/html.html");
        m.setInputXLSFile("G:/projects/svn/ICardex/src/sample/xls.xls");
        m.setDestinationFile("G:/projects/svn/ICardex/src/sample/output.html");
        m.setCardDimensions(new Dimension(80,50));
        m.setMatrix(new Dimension(3,0));
        try {
            System.out.println(m.getFieldNamesInHTML());
            System.out.println(m.getFieldNamesInXLS());
            HashMap<String,String> map = new HashMap<String, String>();
            
            map.put("name","fname");
            map.put("branch","branch");
            map.put("year","id");
            map.put("subject","lname");
            m.setMap(map);
            m.make();
        } catch (Exception e) {
            e.printStackTrace();
        }
        
    }
}
